package com.cmcc;

import com.cmcc.flowable.conf.AppDispatcherServletConfiguration;
import com.cmcc.flowable.conf.ApplicationConfiguration;
import com.cmcc.flowable.conf.DatabaseAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

@Import(value={
        // 引入修改的配置
        ApplicationConfiguration.class,
        AppDispatcherServletConfiguration.class,
        // 引入 DatabaseAutoConfiguration 表更新转换
        DatabaseAutoConfiguration.class})
@ComponentScan(basePackages = {"com.cmcc.*"})
// 移除 Security 自动配置
// Spring Cloud 为 Greenwich 版本
@SpringBootApplication(exclude={SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class})
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
